package ru.amse.stroganova.ui.tool;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;

import ru.amse.stroganova.ui.tool.state.ToolState;

/**
 * This interface represents a skeleton for different component tools.
 * 
 * @author Dasha Stroganova
 *
 */
public abstract class Tool {

	/**
	 * Invoked when the mouse has been clicked on a component.
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mouseClicked(MouseEvent e) {
	}

	/**
	 * Invoked when a mouse button has been pressed on a component.
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mousePressed(MouseEvent e) {
	}

	/**
	 * Invoked when a mouse button has been released on a component.
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mouseReleased(MouseEvent e) {
	}

	/**
	 * Invoked when the mouse enters a component.
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mouseEntered(MouseEvent e) {
	}

	/**
	 * Invoked when the mouse exits a component.
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mouseExited(MouseEvent e) {
	}

	/**
	 * Invoked when a mouse button is pressed on a component and then dragged.
	 * Mouse drag events will continue to be delivered to the component where
	 * the first originated until the mouse button is released (regardless of
	 * whether the mouse position is within the bounds of the component).
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mouseDragged(MouseEvent e) {
	}

	/**
	 * Invoked when the mouse button has been moved on a component (with no
	 * buttons no down).
	 * 
	 * @param e
	 *            mouse event
	 */
	public void mouseMoved(MouseEvent e) {
	}

	/**
	 * Performs required actions before another tool is set.
	 * 
	 */
	public void finalActions() {
	}

	/**
	 * Sets new state for this tool.
	 * 
	 * @param state
	 */
	public void setState(ToolState state) {
		
	}
	
	/**
	 * Performs any additional painting required.
	 * 
	 * @param g
	 *            graphics
	 * @param backgroundColor
	 */
	public void paint(Graphics g, Color backgroundColor) {

	}
}
